import java.util.Scanner;

public class Homework9 {
    public static void main(String[]args) {
        Scanner in = new Scanner(System.in);
        System.out.println("输入数量");
        int a = in.nextInt();
        System.out.println("1:购物超过50元，加1元换购500毫升可乐；");
        System.out.println("2:购物超过100元，加2元换购1000毫升果汁；");
        System.out.println("3:购物超过100元，加4元换购炫迈口香糖一瓶；");
        System.out.println("4:购物超过200元，加38元换购一瓶进口红酒；");
        System.out.println("5:购物超过200元，加15元换购1袋面粉；");
        System.out.println("0:不换购");
        int b = in.nextInt();
        switch (b) {
            case 1:
                if (a > 50) {
                    a+=1;
                    System.out.println("一瓶500毫升可乐；实际支付的金额:"+a);
                    break;
                } else {
                    System.out.print("谢谢惠顾");
                    break;
                }

            case 2:
                if (a > 100) {
                    a+=2;
                    System.out.println("1000毫升果汁实际支付的金额:"+a);
                    break;
                } else {
                    System.out.print("谢谢惠顾！");
                    break;
                }
            case 3:
                if (a > 100) {
                    a+=4;
                    System.out.println("迈口香糖一瓶实际支付的金额:"+a);
                    break;
                } else {
                    System.out.print("谢谢惠顾！");
                    break;
                }
            case 4:
                if (a > 200) {
                    a+=38;
                    System.out.println("一瓶进口红酒实际支付的金额:"+a);
                    break;
                } else {
                    System.out.print("谢谢惠顾！");
                    break;
                }
            case 5:
                if (a > 200) {
                    a+=15;
                    System.out.println("1袋面粉；实际支付的金额:"+a);
                    break;
                } else {
                    System.out.print("谢谢惠顾！");
                    break;
                }
            case 0:
                System.out.println("不要"+a);
                break;
        }
    }
}
